#include"Manager_data_achieve.h"
#include<fstream>
using namespace std;
using namespace LB;

void Manager_data_achieve::load(vector<Manager>& vm) 
{
	ifstream in;
	in.open("./Library/Managers.dat",ios::binary);
	Manager m;
	while(in.read((char*)&m,sizeof(Manager)))
	{
		vm.push_back(m);
	}
	
}
void Manager_data_achieve::save(vector<Manager>& vm) 
{
	ofstream out;
	out.open("./Library/Managers.dat",ios::binary);
	for(unsigned int i=0;i<vm.size();i++)
	{
		out.write((char*)&vm[i],sizeof(Manager));	
	}
}
